<template>
  <div class="home-container">
    <el-card class="home-card">
      <div class="hero-section">
        <img src="@/assets/签到.png" alt="签到" class="hero-image" />
        <h1>欢迎来到签到应用</h1>
        <p>轻松完成每日签到，查看历史记录，保持持续签到！</p>
        <el-button type="primary" size="large" @click="goToSignIn"
          >开始签到</el-button
        >
      </div>
    </el-card>

    <el-row :gutter="20" class="feature-section">
      <el-col :span="8">
        <el-card shadow="hover">
          <el-icon><calendar /></el-icon>
          <h3>每日签到</h3>
          <p>每日签到，保持连续性，获取奖励！</p>
        </el-card>
      </el-col>
      <el-col :span="8">
        <el-card shadow="hover">
          <el-icon><document /></el-icon>
          <h3>签到记录</h3>
          <p>查看你所有的签到历史记录。</p>
        </el-card>
      </el-col>
      <el-col :span="8">
        <el-card shadow="hover">
          <el-icon><bell /></el-icon>
          <h3>提醒功能</h3>
          <p>设置每日签到提醒，避免遗漏！</p>
        </el-card>
      </el-col>
    </el-row>
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router'
import { ElIcon } from 'element-plus'
import { Bell } from '@element-plus/icons-vue'
import { Document } from '@element-plus/icons-vue'
import { Calendar } from '@element-plus/icons-vue'

const router = useRouter()

const goToSignIn = () => {
  router.push('/signin')
}
</script>

<style scoped>
.home-container {
  text-align: center;
  padding: 40px 20px;
  background-color: #f4f4f4;
}

.home-card {
  background-color: white;
  padding: 30px;
  border-radius: 10px;
}

.hero-section {
  margin-bottom: 40px;
}

.hero-image {
  max-width: 200px;
  margin-bottom: 20px;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

p {
  font-size: 1.25rem;
  color: #666;
  margin-bottom: 20px;
}

.feature-section {
  margin-top: 40px;
}

.feature-section h3 {
  margin-top: 20px;
}

.el-card {
  padding: 20px;
  text-align: center;
}

.el-icon {
  font-size: 3rem;
  color: #409eff;
  margin-bottom: 20px;
}
</style>
